﻿@{
    ViewBag.Title = "RolePermissionList";
    Layout = "~/Views/Shared/_LayoutChild.cshtml";
}
@section head
{
    <script language="javascript" type="text/javascript">
        var selectId = "";
        var curSelectNode = null;
        $(document).ready(function () {
            loadRoleMenus();
        });
        function zTreeRoleMenuCheck(event, treeId, treeNode) {
            var treeObj = $.fn.zTree.getZTreeObj(treeId);
            var nodes = treeObj.getCheckedNodes(true);
            var menuIds = '';
            for (var i = 0; i < nodes.length; i++) {
                menuIds += nodes[i].MenuID + ",";
            }
            if (menuIds.length > 0)
                menuIds = menuIds.substring(0, menuIds.length - 1);
            $.post('@Url.Content("~/SystemManage/Role/SaveRoleMenus")', { roleId: '@ViewBag.RoleID', menuIds: menuIds }, function (data) {
                if (data.Data == '' || data.Data == null) {
                    parent.asyncbox.tips('操作成功!', 'success', 1000);
                }
                else {
                    parent.asyncbox.tips('操作失败!', 'error', 1000);
                }
            });
        }
    </script>
}
<!--左侧导航，不用时直接去掉-->
<div class="ui-layout-center">
    @Html.Partial("_RoleMenuTree")
</div>
<!--<div>
    <input type="text" id='aa' value="ddddd" />
</div>
-->